package org.dubnation.org.domain;

import org.dubnation.base.domain.BaseDomain;


import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhu
 * @since 2023-10-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Component
public class Employee extends BaseDomain{

    private static final long serialVersionUID = 1L;
    /** 可用 **/
    public static final Integer AVAILABLE = 1;
    /** 不可用 **/
    public static final Integer UNAVAILABLE = 2;
    /** 注销 **/
    public static final Integer LOGOUT = 3;

    private Long id;
    @NotBlank(message = "用户名不能为空")
    private String username;
    /**
     * 真实姓名
     */
    @NotBlank(message = "姓名不能为空")
    private String realName;
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不合法")
    private String email;
    @NotBlank(message = "手机号码不能为空")
    private String phone;
    /**
     * 盐值
     */
    private String salt;
    /**
     * 密码要加密保存
     */
    @NotBlank(message = "密码不能为空")
    private String password;
    private String confirmPassword;
    private Integer age;
    private Integer sex;
    /**
     * 1=正常 2=锁定 3=注销
     */
    private Integer state;
    private Department department;
    private Long loginInfoId;
}
